module.exports = {
    context:__dirname+"/app",
    entry:{
        app:"./index.js"
    },
    output:{
        path:__dirname+"/dist",
        filename:"[name].bundle.js"
    },
    module:{
        rules:[
            {
                test:/\.jsx?$/,
                exclude: /node_modules/,
                use: [{
                    loader: "babel-loader",
                    options: { presets: ["react","es2015"] }
                }],
            },
            {   
                test: /\.css$/,
                use: ["style-loader", "css-loader"],
            },
            {
                test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
                loader: 'url?limit=10000&name=images/[name].[ext]'
              }, {
                test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
                loader: 'url?limit=10000&name=images/[name].[ext]'
              }
        ],
        　　loaders: [
            　　　　{
            　　　　　　test: /\.(png|jpg)$/,
            　　　　　　loader: 'url-loader?limit=8192&name=images/[hash:8].[name].[ext]'
            　　　　},
            　　　　{
                　　　　　　test: /\.html$/,
                　　　　　　loader: 'html-withimg-loader'
                　　}
            　　]
    }
}